<?php

namespace App;

use DB;
use Illuminate\Database\Eloquent\Model;
use Storage;

/**
 * Class Banner
 *
 * @package App
 * @mixin \Eloquent
 */
class Zacomrep extends Model
{
    public $timestamps = false;
    protected $table = 'kl_article_comment_reply';


    //删除
    const DEL_NO = 0;//删除了
    const DEL_OFF = 1; //未删除

    static $DelDisplay = [
        self::DEL_NO => '不显示',
        self::DEL_OFF => '显示'
    ];

	
	//删除banner
    static function Del($id, $request)
    {
        DB::beginTransaction();

		if (!DB::table('kl_article_comment_reply')->where('id', $id)->delete()) {
			DB::rollBack();
			return ['status' => 2, 'message' => '删除失败'];
		}		

        DB::commit();

        return ['status' => 1, 'message' => '删除成功'];
    }

}
